#region File Description
//-----------------------------------------------------------------------------
// ExplosionSmokeParticleSystem.cs
//
// Microsoft XNA Community Game Platform
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
#endregion

#region Using Statements
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
#endregion

namespace mirror
{
    /// <summary>
    /// Custom particle system for creating the smokey part of the explosions.
    /// </summary>
    class ExplosionSmokeParticleSystem3D : ParticleSystem3D
    {
        public ExplosionSmokeParticleSystem3D()
        { }


        protected override void InitializeSettings(ParticleSettings3D settings)
        {
            settings.TextureName = "particles3d/smoke";

            settings.MaxParticles = 200;


            float multiplier = 1.0f;
            float durationMultiplier = 1.0f;
            settings.Duration = TimeSpan.FromSeconds(4 * durationMultiplier);

            settings.MinHorizontalVelocity = 0 * multiplier;
            settings.MaxHorizontalVelocity = 50 * multiplier;

            settings.MinVerticalVelocity = -10 * multiplier;
            settings.MaxVerticalVelocity = 50 * multiplier;

            settings.Gravity = new Vector3(0, -20, 0) * multiplier;

            settings.EndVelocity = 0 * multiplier;

            settings.MinColor = Color.LightGray;
            settings.MaxColor = Color.White;

            settings.MinRotateSpeed = -2;
            settings.MaxRotateSpeed = 2;

            settings.MinStartSize = 10 * multiplier;
            settings.MaxStartSize = 10 * multiplier;

            settings.MinEndSize = 100 * multiplier;
            settings.MaxEndSize = 200 * multiplier;
        }
    }
}
